import { Fragment } from '@/components/Fragment';
import { Loader } from '@aws-amplify/ui-react';
import { LoaderDemo } from './demo';
import {
DefaultLoaderExample,
DeterminateLoaderExample,
LoaderAccessibilityExample,
LoaderColorExample,
LoaderIsPercentageTextHiddenExample,
LoaderSizesExample,
LoaderVariationExample,
LoaderThemeExample,
} from './examples';
import { Example, ExampleCode } from '@/components/Example';
import { ComponentStyleDisplay } from '@/components/ComponentStyleDisplay';
import ThemeExample from '@/components/ThemeExample.mdx';
## Demo
## Usage
Import the Loader component and styles.
```jsx file=./examples/DefaultLoaderExample.tsx
```
### Sizes
Use the `size` prop to change the Loader size. Available options are `small`, `large`, and none (default).
```jsx file=./examples/LoaderSizesExample.tsx
```
### Variation
Loader comes in 2 variants, `linear` and none(default). Pass the `variation` prop and set it to either of these values.
```jsx file=./examples/LoaderVariationExample.tsx
```
### Colors
Pass `filledColor` and `emptyColor` props to color your own Loader.
```jsx file=./examples/LoaderColorExample.tsx
```
### Determinate
Most often loaders are indeterminate (looped) but may be determinate (percentage-based) when the system can calculate the size of the request — for example, when downloading a large file. To use a determinate loader, set `isDeterminate` to `true` and pass `percentage`.
```jsx file=./examples/DeterminateLoaderExample.tsx
```
To hide the percentage text, set `isPercentageTextHidden` to `true`.
```jsx file=./examples/LoaderIsPercentageTextHiddenExample.tsx
```
### Accessibility
The Loader is a SVG image with role set to `img` on the outer `